//
//  MyGroupCell.m
//  TrueLove
//
//  Created by 刘康 on 15/1/28.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "MyGroupCell.h"

@implementation MyGroupCell

- (void)dealloc
{
    [_MyImageView release];
    [_titleLabel release];
    [_descriptionLabel release];
    [_todayLabel release];
    [_browseLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.MyImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_MyImageView];
        [_MyImageView release];
        
        self.titleLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_titleLabel];
        self.titleLabel.font = [UIFont systemFontOfSize:20];
        [_titleLabel release];
        
        self.descriptionLabel = [[UILabel alloc] init];
        self.descriptionLabel.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:_descriptionLabel];
        [_descriptionLabel release];
        
        self.todayLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_todayLabel];
        [_todayLabel release];
        
        self.browseLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_browseLabel];
        [_browseLabel release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.MyImageView.frame = CGRectMake(10, 10, self.contentView.frame.size.width / 4 - 10, self.contentView.frame.size.height - 20);
    self.titleLabel.frame = CGRectMake(self.contentView.frame.size.width / 4 + 20, 10, self.contentView.frame.size.width * 3 / 4 - 40, self.contentView.frame.size.height / 5);
    self.descriptionLabel.frame = CGRectMake(self.contentView.frame.size.width / 4 + 20, self.contentView.frame.size.height * 2 / 5, self.contentView.frame.size.width * 3 / 4 - 40, self.contentView.frame.size.height / 5);
    self.todayLabel.frame = CGRectMake(self.contentView.frame.size.width / 4 + 20, self.contentView.frame.size.height * 7 / 10, self.contentView.frame.size.width / 5, self.contentView.frame.size.height / 5);
    self.browseLabel.frame = CGRectMake(self.contentView.frame.size.width * 3 / 5 , self.contentView.frame.size.height * 7 / 10, self.contentView.frame.size.width / 3, self.contentView.frame.size.height / 5);
}





- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
